package com.usian.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.usian.entity.Result;
import com.usian.entity.ResultCodeEnum;
import com.usian.mapper.UserMapper;
import com.usian.service.UserService;
import com.usian.user.UserDeptDto;
import com.usian.user.Users;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author:张永杰
 * @ClassName: UserServiceImpl
 * @Date: 2024/12/11
 * @Description:
 */
@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, Users>  implements UserService {
    @Autowired
    private UserMapper userMapper;
    @Override
    public Result<List<UserDeptDto>> findAllUser() {
        List<UserDeptDto> list = userMapper.findAllUser();
        return Result.build(list, ResultCodeEnum.SUCCESS);
    }
}
